package mails.da;

import java.util.HashMap;
import java.util.List;

import mails.vo.Mail;

/**
 * MailDAO.java
 * 
 * DataAccessObject for the ValueObject mails.vo.Mail.java
 *
 * @author rob
 */
public interface MailDAO {
	
	/**
	 * sets the path to the sqlite file with the data
	 * 
	 * @param path String
	 */
	public void setDBFilePath(String path);
	
	/**
	 * updates the column wordcount for all given mails
	 * 
	 * @param mails
	 */
	public void updateWordcount(List<Mail> mails);
	
	/**
	 * gets a list of Mail Objects from the DB
	 * 
	 * @param String query
	 * 
	 * @return  mails
	 */
	public List<Mail> getMails(String theQuery);

	/**
	 * saves/updates the mail within the database
	 * 
	 * @param mail - Mail
	 */
	public void saveMail(Mail mail);
	
	/**
	 * get mails with specific address
	 * @param addr
	 * 
	 */
	public List<Mail> getAddressMails(String addr);
	
	/**
	 * 
	 * @return 
	 */
	public HashMap<String, Integer> getIndexedWords();
}
